/**
 * 
 */
package com.primestone.cim.util;

import java.util.Random;

/**
 * @author cesar.mateus
 *
 */
public class RandomUtil {
	private static final Random FLOAT_RANDOM = new Random();
	private static final double MEAN = 1000.0f; 
	private static final double VARIANCE = 500.0f;

	private static double getGaussian(double aMean, double aVariance){
		return aMean + FLOAT_RANDOM.nextGaussian() * aVariance;
	}

	/**
	 * 
	 * @return
	 */
	public static double nextDouble() {
		return getGaussian(MEAN, VARIANCE);
	}
	
	/**
	 * 
	 * @return
	 */
	public static String nextString() {
		return String.valueOf(getGaussian(MEAN, VARIANCE));
	}
	
	/**
	 * 
	 * @param mean
	 * @param variance
	 * @return
	 */
	public static String nextString(double mean, double variance) {
		return String.valueOf(getGaussian(mean, variance));
	}

}
